package com.sy.core.service;

import com.sy.core.mapper.SyOrderInfoMapper;
import com.sy.core.model.SyOrderInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service("orderService")
public class OrderService {
    @Autowired
    private SyOrderInfoMapper syOrderInfoMapper;

    public List<Map<String, Object>> queryList(SyOrderInfo syOrderInfo) {
        syOrderInfo.setIsDelete("0");
        return syOrderInfoMapper.queryList(syOrderInfo);
    }

    public Integer update(SyOrderInfo syOrderInfo) {
        return syOrderInfoMapper.updateByPrimaryKeySelective(syOrderInfo);
    }

    public Integer insert(SyOrderInfo syOrderInfo) {
        return syOrderInfoMapper.insertSelective(syOrderInfo);
    }

    public Map<String, Object> queryOne(String pk) {
        return syOrderInfoMapper.queryOne(pk);
    }

    public Integer delete(String pk) {
        return syOrderInfoMapper.deleteByPrimaryKey(pk);
    }

    public List<SyOrderInfo> selectAll(SyOrderInfo syOrderInfo) {
        return syOrderInfoMapper.selectAll(syOrderInfo);
    }
}
